import { Inject, Controller, Get, Query, Post } from '@midwayjs/decorator';
import { Context } from '@midwayjs/koa';
import { NovelService } from 'src/service/novel.service';




@Controller('/vue-admin-template')
export class APIController {
  @Inject()
  ctx: Context;

  @Inject()
  NovelService: NovelService;

  @Get('/user/info')
  async getnovel(@Query('uid') uid) {
   //   return  'Hello Midwayjs12312312!'
     return  {"code":20000,"data":{"roles":["admin"],"introduction":"I am a super administrator","avatar":"https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif","name":"Super Admin"}}
  }
  @Post('/user/login')
  async getnovel2(@Query('uid') uid) {
   //   return  'Hello Midwayjs12312312!'
     return  { 
        code:20000,
        data:{ 
           token :"admin-token"
        }
     }
     
  }


}

